package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;
import com.lanchetech.bean.vo.BargainDetailVO;
import com.lanchetech.entity.BargainDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BargainDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(BargainDetail record);

    int insertSelective(BargainDetail record);

    BargainDetail selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BargainDetail record);

    int updateByPrimaryKey(BargainDetail record);

    List<BargainDetailVO> findAllPage(PageReq req);

    BargainDetail findOneByUserIdAndActivityId(@Param("userId")Long userId, @Param("activityId")Long activityId);

    BargainDetail findOneByBargainRecordId(@Param("bargainRecordId")Long bargainRecordId);

    BargainDetail findOneByBargainRecordIdAndUserId(@Param("bargainRecordId")Long bargainRecordId,@Param("userId")Long userId);
}